<?php

class InboundHelper {
	
	/** 取质量员能见到的采购入库单列表 */
	public static function getConfirmList($uid, $s=0, $l=0){
		return Db::get('Reviewer')->select("t1.*,t0.addtime as r_addtime,t0.pass as r_pass,t0.remark as r_remark")
				->join('_Bound')
				->on('t0.related_id=t1.id AND t1.type='.Bound::TYPE_CK)
				->where("t0.user_id={$uid} AND t0.class=".Reviewer::CLS_QC)
				->group('t1.id')->order('t1.id DESC')->limit($s,$l)->getAll();
	}
	
	public static function getDetail($id){
		$bound = BoundHelper::getDetail($id);
		return $bound && $bound['class']=='in' ? $bound : false;
	}
	
}

?>
